//
//  recordViewController.h
//  picRecodeDemo
//
//  Created by glendale on 13-6-21.
//  Copyright (c) 2013年 glendale. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import "MainMenuDataModel.h"

#import "HelpClass.h"

@interface recordViewController : UIViewController<AVAudioSessionDelegate,AVAudioRecorderDelegate,AVAudioPlayerDelegate>{
    
}
@property(nonatomic,strong)NSURL *soundFileURL;
@property(nonatomic,assign)BOOL recording;
@property(nonatomic,assign)BOOL playing;
@property(nonatomic,strong)AVAudioRecorder *soundRecorder;
@property(nonatomic,strong)AVAudioPlayer *audioPlayer;
@property(nonatomic,strong)AVAudioSession *auSession;

@property(nonatomic,strong)NSString *recordName;
@property(nonatomic,assign)NSInteger recordId;

-(void)prepareForRecord;
-(void)recordOrStop:(UIButton*)sender;
-(void)playback:(NSInteger)index;
-(NSString*)soundfileTextPath;
-(void)stopBack;

//根据序号得到要播放的录音的名称
-(NSString *)getNameInRecordListByIndex:(NSInteger)index;

@end
